package com.management.system.mapper;

import com.management.system.beans.user.TokenParam;
import com.management.system.beans.user.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {
    @Select("select * from user")
    List<User> all();

    @Select("select * from user where name = #{name}")
    User login(String name);

    @Select("select * from user where token = #{token}")
    TokenParam token(String token);
}
